//
//  SearchHistory.swift
//  搜索历史模型
//
//  Created by jin on 2024/9/26.
//

import UIKit

// 腾讯开源的数据库框架
import WCDBSwift

class SearchHistory: BaseModel, TableCodable {
    
    static let NAME = "SearchHistory"
    
    var title:String!

    /// 创建时间
    var createdAt:Int!
    
    required init() {
        
    }
    
    //WCDB模型绑定
    enum CodingKeys: String, CodingTableKey {
        typealias Root = SearchHistory
        
        case title
        case createdAt
        
        static let objectRelationalMapping = TableBinding(CodingKeys.self){
            BindColumnConstraint(title, isPrimary: true)
        }
    }
}
